<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/html">
<head th:replace="layouts::header"></head>
<body>
<nav th:replace="layouts::navbar"></nav>
<div class="container1">
    <form th:action="@{/student/save}" th:object="${student}" method="POST">
<!--        <input type="hidden" th:field="${student.studentId}">-->
        <div class="box">
        <div class="form-group">
            <div>
                <label class="a1" >学号:</label>
                <input type="text" placeholder="请输入学号"  style="width: 190px" th:field="${student.studentNum}">
            </div>
        </div>
        <br>
        <div class="form-group">
            <div>
                <label class="a1">姓名:</label>
                <input type="text" style="width: 190px" placeholder="请输入姓名" th:field="${student.name}" >
            </div>
        </div>
        <br>
        <div class="form-group">
            <div>
                <label class="a1">性别:</label>
                <label class="a1">
                    <input type="radio" th:field="${student.gender}" value="男">男
                </label>
                <label class="a1">
                    <input type="radio" th:field="${student.gender}" value="女">女
                </label>
                <br>
                <span th:if="${#fields.hasErrors('gender')}" th:errors="${student.gender}"></span>
            </div>
        </div>
        <br>
        <div class="form-group">
            <div>
                <label class="a1">社团</label>
                <select class="form-control" th:field="*{associations}" style="width: 230px">
                    <option th:each="association : ${allAssociation}" th:value="${association.associationId}" th:text="${association.associationName}">
                    </option>
                </select>
            </div>
        </div>
        <br>
        <div class="form-group">
            <label class="a1">班级</label>
            <div>

                <select class="form-control" th:field="*{class1}" style="width: 230px">
                    <option th:each="class1 : ${allClass1}" th:value="${class1.class1Id}" th:text="${class1.class1Name}">
                    </option>
                </select>
            </div>
        </div>
        </div>
        <br>
<br>
<div class="a2">
        <button class="btn btn-info" type="submit">新建学生</button>
</div>
    </form>
</div>

</body>
</html>